Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add osx travis branch #547

Closed
wants to merge 2 commits into from
Closed

Add osx travis branch #547

wants to merge 2 commits into from

Conversation

jchodera
Copy link
Member

@jchodera jchodera commented Nov 9, 2016

Addresses #332

@jchodera
Copy link
Member Author

jchodera commented Nov 9, 2016

Looks like we'll have to skip double precision on OpenCL on the osx tests:

======================================================================
ERROR: Test the restraints in a protein:ligand system.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/yank-0.12.0-py2.7-macosx-10.6-x86_64.egg/yank/tests/test_restraints.py", line 169, in test_protein_ligand_restraints
    yaml_builder.build_experiments()
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/yank-0.12.0-py2.7-macosx-10.6-x86_64.egg/yank/yamlbuild.py", line 1284, in build_experiments
    self._run_experiment(combination, output_dir)
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/yank-0.12.0-py2.7-macosx-10.6-x86_64.egg/yank/yamlbuild.py", line 2315, in _run_experiment
    platform = self._configure_platform(exp_opts['platform'], exp_opts['precision'])
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/yank-0.12.0-py2.7-macosx-10.6-x86_64.egg/yank/yamlbuild.py", line 2147, in _configure_platform
    raise RuntimeError('This device does not support double precision for OpenCL.')
RuntimeError: This device does not support double precision for OpenCL.
======================================================================
ERROR: Test that the precision for platform is set to mixed by default.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/yank-0.12.0-py2.7-macosx-10.6-x86_64.egg/yank/tests/test_yaml.py", line 1547, in test_default_platform_precision
    platform_precision='auto')
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/yank-0.12.0-py2.7-macosx-10.6-x86_64.egg/yank/yamlbuild.py", line 2147, in _configure_platform
    raise RuntimeError('This device does not support double precision for OpenCL.')
RuntimeError: This device does not support double precision for OpenCL.
======================================================================
ERROR: Test solvation free energy experiment run.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/yank-0.12.0-py2.7-macosx-10.6-x86_64.egg/yank/tests/test_yaml.py", line 1855, in test_run_solvation_experiment
    yaml_builder.build_experiments()
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/yank-0.12.0-py2.7-macosx-10.6-x86_64.egg/yank/yamlbuild.py", line 1284, in build_experiments
    self._run_experiment(combination, output_dir)
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/yank-0.12.0-py2.7-macosx-10.6-x86_64.egg/yank/yamlbuild.py", line 2315, in _run_experiment
    platform = self._configure_platform(exp_opts['platform'], exp_opts['precision'])
  File "/Users/travis/miniconda3/envs/test/lib/python2.7/site-packages/yank-0.12.0-py2.7-macosx-10.6-x86_64.egg/yank/yamlbuild.py", line 2147, in _configure_platform
    raise RuntimeError('This device does not support double precision for OpenCL.')
RuntimeError: This device does not support double precision for OpenCL.

@jchodera
Copy link
Member Author

jchodera commented Nov 9, 2016

Ah, I bet it's the fact that mixed precision is our default.

We could either

  • run the tests in single
  • switch to single by default for just the travis tests
  • add some way to disable a platform or precision option
  • fall back on a different default precision if `mixed is unavailable

@andrrizzi
Copy link
Contributor

Hmm, weird. The error should come up only if you force explicitly the precision to be mixed/double, but for the default precision, YamlBuilder should be able to understand if that's not supported. Let me check if there's a bug.

@andrrizzi
Copy link
Contributor

I can't reproduce it on my laptop (which doesn't support double precision for OpenCL), but there's something weird going on. YamlBuilder decides to use single precision for OpenCL as you can see on this line, but the function that checks whether single is supported by OpenCL on the device returns False. Is there some other reason why this Context creation should fail?

@andrrizzi
Copy link
Contributor

Otherwise I'll branch this and create a test PR to try to understand what's going on.

@jchodera
Copy link
Member Author

jchodera commented Nov 9, 2016

I think the travis osx runs in a virtual container: https://docs.travis-ci.com/user/osx-ci-environment/

What about using simtk.openmm.Platform.supportsDoublePrecision() instead of trapping context creation?

@andrrizzi
Copy link
Contributor

andrrizzi commented Nov 9, 2016

What about using simtk.openmm.Platform.supportsDoublePrecision() instead of trapping context creation?

That function returns True if it is theoretically possible for the Platform to be set to a double precision. It doesn't check if device used actually supports it.

I think the travis osx runs in a virtual container: https://docs.travis-ci.com/user/osx-ci-environment/

Sorry, I'm not sure I follow. Are Platforms somewhat messed up on a virtual container?

@jchodera
Copy link
Member Author

jchodera commented Nov 9, 2016

Sorry, I'm not sure I follow. Are Platforms somewhat messed up on a virtual container?

They shouldn't be, but it may not be exactly the same as running on real Mac hardware.

@andrrizzi
Copy link
Contributor

I see. I'll branch this and open a test PR then.

@jaimergp jaimergp mentioned this pull request Nov 14, 2020
@jaimergp
Copy link
Member

Superseded by #1244

@jaimergp jaimergp closed this Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants